package com.模拟线程安全问题.同步方法synchronized;

public class WithdrawMoneyThread extends Thread {

    //注入账户
    private Account account;

    public WithdrawMoneyThread(Account account, String name) {
        this.account = account;
        super.setName(name);
    }

    @Override
    public void run() {
        account.getMoney(100000.0);
    }
}
